
class JQProductAttrDeleteService extends global.JQService {
    async do_action(){
		console.log('delete 1111')
		if(!this.conn)console.log('do_action::conn error');
		let data_obj = this.req_obj.data_obj;
		
		// _addParams
		console.log('delete ' + JSON.stringify(data_obj));
		if(!data_obj || !data_obj.obj || !data_obj.obj.id){
			throw {'code':global.consts.Error.ERROR_PARAM,
				'message':global.consts.Message.ERROR_PARAM};
		}
		
		let inst = global.JQTableIF.instance('cp_attribution_table',this.conn);
		console.log('delete 22222')
		let update={id:data_obj.obj.id,attr_status:-1}
		let obj =await inst.update(update);
		console.log('delete 22222  ' + obj)
		return obj;			
	}

}
module.exports = JQProductAttrDeleteService;

